<include file="Index/header" />
<body>
<div id="wrapper">

    <include file="Index/nav"/>
<div id="page-wrapper">

	<div class="container-fluid">

		<!-- Page Heading -->
		<div class="row">
			<div class="col-lg-12">

				<ol class="breadcrumb">
					<li>
						<i class="fa fa-dashboard"></i>  <a href="/admin.php?c=positioncontent">推荐位内容管理</a>
					</li>
					<li class="active">
						<i class="fa fa-edit"></i> 修改推荐位内容
					</li>
				</ol>
			</div>
		</div>
		<!-- /.row -->

		<div class="row">
			<div class="col-lg-6">

				<form class="form-horizontal" id="singcms-form">
					<div class="form-group">
						<label for="inputname" class="col-sm-2 control-label">标题:</label>
						<div class="col-sm-5">
							<input type="text" name="title" class="form-control" id="inputname" value="{$vo.title}" placeholder="请填写标题">
						</div>
					</div>
					<div class="form-group">
						<label for="inputname" class="col-sm-2 control-label">选择推荐位:</label>
						<div class="col-sm-5">
							<select class="form-control" name="position_id">
                                                                 <foreach name="positions" item="position" >   
                                                                     <option value="{$position.id}"<if condition="$position['id'] eq $vo['position_id']">selected="selected"</if>>{$position.name}</option>
                                                                  </foreach>
							</select>
						</div>
					</div>

					<div class="form-group">
						<label for="inputname" class="col-sm-2 control-label">缩图:</label>
						<div class="col-sm-5">
							<input id="file_upload"  type="file" multiple="true" >
							<img style="display: none" id="upload_org_code_img" src="{$vo.thumb}" width="150" height="150">
							<input id="file_upload_image" name="thumb" type="hidden" multiple="true" value="{$vo.thumb}">
						</div>
					</div>

					<div class="form-group">
						<label for="inputPassword3" class="col-sm-2 control-label">url:</label>
						<div class="col-sm-5">
							<input type="text" class="form-control" name="url" id="inputPassword3" placeholder="请url地址" value='{$vo.url}' >
						</div>
					</div>
					<div class="form-group">
						<label for="inputname" class="col-sm-2 control-label">文章id:</label>
						<div class="col-sm-5">
							<input type="text" name="news_id" value='{$vo.news_id}' class="form-control" id="inputname" placeholder="如果和文章无关联的可以不添加文章id">
						</div>
					</div>
					<div class="form-group">
					<label for="inputPassword3" class="col-sm-2 control-label">状态:</label>
					<div class="col-sm-5">
                                            <input type="radio" name="status" id="optionsRadiosInline1" value="1" <if condition="$vo.status eq 1">checked</if>>开启
                                            <input type="radio" name="status" id="optionsRadiosInline2" value="0" <if condition="$vo.status eq 0">checked</if>>关闭
					</div>
                                       <input type='hidden'name='id'value='{$vo.id}' />
				</div>

					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="button" class="btn btn-default" id="singcms-button-submit">保存</button>
						</div>
					</div>
				</form>


			</div>

		</div>
		<!-- /.row -->

	</div>
	<!-- /.container-fluid -->

</div>
<!-- /#page-wrapper -->
</div>
<script>
	var SCOPE = {
		'save_url' : '/admin.php?c=positioncontent&a=add',
		'jump_url' : '/admin.php?c=positioncontent&a=index',
		'ajax_upload_image_url' : '/admin.php?c=image&a=ajaxuploadimage',
		'ajax_upload_swf' : '/Public/js/party/uploadify.swf'
	};
   var thumb="{$vo.thumb}";
    if(thumb){
     $("#upload_org_code_img").show();  
    }
        
</script>
<!-- /#wrapper -->
<script type="text/javascript" src="/Public/js/admin/form.js"></script>
<script src="/Public/js/admin/image.js"></script>
<include file="Index/footer" />